package com.situ.spring.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.situ.spring.dao.ICourseDao;
import com.situ.spring.service.ICourseService;

/*
<bean name="studentService" class="com.situ.spring.service.impl.StudentServiceImpl">
	<property name="studentDao" ref="studentDao"/>
</bean>
*/
@Service("courseService")
public class CourseServiceImpl implements ICourseService{
	//<property name="studentDao" ref="studentDao"/>
	//@Resource 从Spring容器中根据名字拿出指定的对象注入进来
	@Resource(name = "courseDao")
	private ICourseDao courseDao;

	@Override
	public void selectAll() {
		System.out.println("CourseServiceImpl.selectAll()");
		courseDao.selectAll();
	}

}
